<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 

<div width="100%" class="queryReturnContainer">
<form:form method="post" action="../report0501/doPreview.do" commandName="formData">
	<input type="hidden" name="defStartYear" value="${formData.defStartYear }"/>	       	    	
	<input type="hidden" name="startYear" value="${formData.startYear }"/>
	<input type="hidden" name="endYear" value="${formData.endYear }"/>
	<input type="hidden" name="timeType" value="${formData.timeType }"/>
	<input type="submit" value="回報表查詢"/>                    
 </form:form> 
</div>

<form:form method="post" action="doPreview.do" commandName="formData">
 
<table width="800px" class="form">
	<tbody>
    <tr>
        <td width="15%">
			統計時間類別
        </td>    
        <td width="35%">
 
				<c:choose>
					<c:when test="${formData.timeType!=null && formData.timeType=='Year'}">
			            <input type="radio" name="timeType" value="Year"  checked/> <spring:message code="report.timetype.year"/><br />
						<input type="radio" name="timeType" value="Quarter"/> <spring:message code="report.timetype.season"/><br />
						<input type="radio" name="timeType" value="Month"/> <spring:message code="report.timetype.month"/>
					</c:when>		
					<c:when test="${formData.timeType!=null && formData.timeType=='Quarter'}">
			            <input type="radio" name="timeType" value="Year" /> <spring:message code="report.timetype.year"/><br />
						<input type="radio" name="timeType" value="Quarter" checked/> <spring:message code="report.timetype.season"/><br />
						<input type="radio" name="timeType" value="Month"/> <spring:message code="report.timetype.month"/>
					</c:when>							
					<c:otherwise>
			            <input type="radio" name="timeType" value="Year" /> <spring:message code="report.timetype.year"/><br />
						<input type="radio" name="timeType" value="Quarter" /> <spring:message code="report.timetype.season"/><br />
						<input type="radio" name="timeType" value="Month" checked/> <spring:message code="report.timetype.month"/>
					</c:otherwise>
				</c:choose>  	        	
	                     
        </td>            
    </tr>

    </tbody>
    <tfoot>
    <tr>
    	<td>
    		統計分類:
    		<select name="groupbyColumn">
				<option value="ProductType" <c:if test="${formData.groupbyColumn == 'ProductType'}"> selected</c:if> >產品別</option>
				<option value="MadeIn"  <c:if test="${formData.groupbyColumn == 'MadeIn'}"> selected</c:if> >產地別</option>
				<option value="DetetminePrinciple6"  <c:if test="${formData.groupbyColumn == 'DetetminePrinciple6'}"> selected</c:if> >判定原則</option>
				
				<c:if test="${formData.determine =='Y'}">
					<option value="DutyUnit1"  <c:if test="${formData.groupbyColumn == 'DutyUnit1'}"> selected</c:if> >權責單位</option>
					<option value="CustID" <c:if test="${formData.groupbyColumn == 'CustID'}"> selected</c:if> >客戶</option>
					<option value="IsSendAgain" <c:if test="${formData.groupbyColumn == 'IsSendAgain'}"> selected</c:if>>在發生</option>
					<option value="WhereHappen" <c:if test="${formData.groupbyColumn == 'WhereHappen'}"> selected</c:if> >發生地點</option>
					<option value="IsFirstDelivery" <c:if test="${formData.groupbyColumn == 'IsFirstDelivery'}"> selected</c:if> >首批交貨</option>
					<option value="CustRequireProduct" <c:if test="${formData.groupbyColumn == 'CustRequireProduct'}"> selected</c:if> >客戶要求</option>
				</c:if>
				
			</select>
    	</td>
        <td colspan="3">
        	<input type="hidden" name="defStartYear" value="${formData.defStartYear }"/>
        	<input type="hidden" name="reportType" value="${formData.reportType }"/>
        	<input type="hidden" name="startYear" value="${formData.startYear }"/>
        	<input type="hidden" name="endYear" value="${formData.endYear }"/>
        	<input type="hidden" name="caseType" value="${formData.caseType }"/>
        	<input type="hidden" name="determine" value="${formData.determine }"/>
            <input type="submit" value="查詢"/>
        </td>
    </tr> 
    </tfoot>       
</table> 




</form:form>